package com.wsb.boot.controller;

import com.wsb.boot.dao.WsbOne;
import com.wsb.boot.mapper.WsbOneMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wang shaobo
 * @date 2020/7/27  20:45
 */
@RestController
public class WsbController {


    @Autowired
    WsbOneMapper wsbOneMapper;

    @RequestMapping("/add")
    public void one(){
        WsbOne one = new WsbOne();
        one.setId(2);
        one.setName("lisi");
        one.setAge(15);

        wsbOneMapper.insert(one);
    }

    @RequestMapping(value = "/port/message/a",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public String teo(){
        System.out.println("one");

        return "成功";

    }

}
